home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / tex / itrns211.zip / SRC / MAKEFILE < prev    next >
Text File  |  1991-11-28  |  5KB  |  196 lines

  1. #
  2. #   Makefile for itrans
  3. # $Header: e:/itrans/src/rcs/makefile.tcc 1.2 91/11/28 20:43:37 avinash Exp $
  4. #   This is for PC-compatibles, using Turbo C++ 2.0
  5.  
  6. #   I do not have a makefile for Microsoft C, but I think these
  7. # changes to this file should do it:
  8. # 1) delete reference to TCC in the SYS line in this file.
  9. # 2) Compile with a LARGE memory model, and change the stack size to
  10. #    be atleast 7000bytes. (i.e, /AL /F1c00)
  11. #
  12. # change all defines as required.
  13.  
  14. #SHELL=/bin/sh   # use this defn on a unix machine
  15. SHELL=        # use this defn on a pc
  16.  
  17. ####### 
  18. # Note that a shell environment variable has to be defined, called
  19. # ITRANSPATH.
  20. # A sample value for it is:
  21. # ITRANSPATH=$(HEADERPATH):$(TFMDIR), where HEADERPATH and TFMDIR
  22. # will be defined further down in this makefile....
  23. ####### 
  24.  
  25. ####### 
  26. # If you do not have a compiler that understands new-style function
  27. # declarators, make the "noansi" object, instead of "itrans" or "all".
  28. # IMPORTANT: Also, make the variable PROTO be null.
  29. ####### 
  30.  
  31. # for SYSV (and friends which use <string.h> instead of <strings.h>)
  32. # define the c-compiler flag
  33. # (add -DMSDOS for 80x86 PC systems (IBM Compatible))
  34. # add -DTCC for Turbo C++ 2.0 Compiler
  35. SYS = -DSYSV -DMSDOS -DTCC
  36.  
  37. # if your C compiler understands prototypes, define PROTO_C,
  38. # else keep PROTO null
  39. # PROTO =
  40. PROTO=-DPROTO_C=1 -DYY_USE_PROTOS
  41.  
  42. # where the installed binary goes
  43. # BINDIR = /usr1/avinash/ITRANS/bin
  44. BINDIR = E:\ITRANS\BIN
  45.  
  46. # where the TFM, and IFM files go
  47. # TFMDIR = /usr/lib/tex/fonts/tfm
  48. TFMDIR=E:\ITRANS\LIB
  49.  
  50. # where the header PS files go
  51. # HEADERDIR = /usr/lib/tex/ps
  52. HEADERDIR=E:\ITRANS\LIB
  53.  
  54. # where the manual page goes
  55. # MANDIR = /usr/local/text/man/man1
  56. MANEXT = 1
  57. MANDIR = E:\ITRANS\DOC
  58.  
  59. # code optimizer
  60. # either use
  61. # OPT = -O2
  62. # OPT = -g
  63. OPT =
  64.  
  65. # libraries to include (-ll -lm -lc on most systems)
  66. # Note, if you do not have lex/yacc on your system, turn off the
  67. # -ll flag. You will also need to modify the dependencies of
  68. # ilex.o and iyacc.o, check out the comments further down this file
  69. # (look for ilex.o and iyacc.o)
  70. # FLIBS= -lmalloc -ll -lm -lc # Use this for SGI machines
  71. # FLIBS= -lm -lc # Use this for machines missing lex/yacc tools
  72. # FLIBS= -lm -lc
  73. FLIBS= # PC related..., nothing needed
  74.  
  75. # C flags to use:
  76. # SGI: -acpp use ANSI C prepreocessor, -prototypes, honor prototypes.
  77. # CFLAGS = -acpp -prototypes $(OPT) $(SYS) $(PROTO)
  78. CFLAGS = -ml -N $(OPT) $(SYS) $(PROTO) -w-rch
  79. LFLAGS = -ml
  80.  
  81. CC=tcc
  82.  
  83. # Yacc flags:
  84. YFLAGS= -d
  85.  
  86. ###
  87.  
  88. SRC =    itrans.c \
  89.     iyacc.y \
  90.     ilex.l \
  91.     lang.c \
  92.     font.c \
  93.     pifm.c \
  94.     ichar.c \
  95.     itotex.c \
  96.     itops.c \
  97.     utils.c
  98.  
  99. OBJ =    itrans.o \
  100.     iyacc.o \
  101.     ilex.o \
  102.     lang.o \
  103.     font.o \
  104.     pifm.o \
  105.     ichar.o \
  106.     itotex.o \
  107.     itops.o \
  108.     utils.o
  109.  
  110. HEADERFILES = devnac.ps itrans.pro
  111. FILES = 
  112.  
  113. .c.o:
  114.     $(CC) -c $(CFLAGS) $<
  115.     mv $*.obj $*.o
  116.  
  117.  
  118. all : itrans.exe
  119.  
  120. itrans.exe : $(OBJ)
  121.     tlink -c c:\tc\lib\c0l $(OBJ), itrans,, @tlink.res
  122. #    $(CC) $(LFLAGS) $(OBJ) $(LIBS) $(FLIBS)
  123.  
  124. $(OBJ) : itrans.h imap.h ifm.h
  125.  
  126. # .l.c:;
  127. # If you do not have lex on your system, uncomment the following
  128. # four lines (you may leave the .l.c line above as it is)
  129. # Also, comment out the ilex.c that follows this defn (the PC related stuff).
  130. # (it may already be commented....)
  131. #---
  132. # ilex.o : ilex.c ytab.h
  133. #     $(CC) -c $(CFLAGS) -DNOLEX ilex.c
  134. # ilex.c : lexyyc
  135. #     cp lexyyc ilex.c
  136.  
  137. # PC related stuff
  138. ilex.c : ilex.l
  139.     flex ilex.l
  140.     mv lexyy.c ilex.c
  141.  
  142. # .y.c:;
  143. # If you do not have yacc on your system, uncomment the following
  144. # four lines (you may leave the .y.c:; line above as it is).
  145. # Also, comment out the iyacc.c that follows this defn (the PC related stuff).
  146. # (it may already be commented....)
  147. #---
  148. # iyacc.o : iyacc.c
  149. #     $(CC) -c $(CFLAGS) iyacc.c
  150. # iyacc.c : ytabc 
  151. #     cp ytabc iyacc.c
  152.  
  153. # PC related stuff
  154. iyacc.c : iyacc.y 
  155.     byacc -d iyacc.y
  156.     mv y_tab.c iyacc.c
  157.  
  158. # When making noansi, make sure PROTO is null
  159. noansi : deansify.exe $(SRC)
  160.     dodeans
  161.     touch noansi
  162.     echo "Make sure the variable PROTO <$(PROTO)> is NULL in the Makefile!"
  163.     make all
  164.  
  165. deansify.exe:    deansify.c
  166.     $(CC) $(CFLAGS) deansify.c
  167.  
  168. install : all
  169.     -mkdir $(BINDIR)
  170.     -mkdir $(HEADERDIR)
  171.     -mkdir $(MANDIR)
  172.     copy itrans.exe $(BINDIR)\itrans.exe
  173.     copy prips.bat $(BINDIR)\prips.bat
  174.     -copy ..\lib\itrans.pro $(HEADERDIR)
  175.     -copy ..\lib\devnac.ps $(HEADERDIR)
  176.     -copy ..\lib\devnac.ifm $(TFMDIR)
  177.     -copy ..\lib\devnac.afm $(TFMDIR)
  178.     -copy ..\lib\dnh.tfm $(TFMDIR)
  179.     -copy ..\lib\dnho.tfm $(TFMDIR)
  180.     -copy ..\lib\dnhrc.tfm $(TFMDIR)
  181.     -copy ..\lib\dnhre.tfm $(TFMDIR)
  182.     -copy ..\lib\wntml10.tfm $(TFMDIR)
  183.     -copy ..\lib\wntml12.tfm $(TFMDIR)
  184.     -copy ..\lib\wntml17.tfm $(TFMDIR)
  185.     -attrib -r $(MANDIR)\itrans.man
  186.     -copy ..\doc\itrans.man $(MANDIR)\itrans.man
  187.     -attrib -r $(MANDIR)\prips.man
  188.     -copy ..\doc\prips.man $(MANDIR)\prips.man
  189.     @echo
  190.     @echo "****** Note: There may be error messages printed when installing,"
  191.     @echo "******       most of them will be harmless---directories already existing, or "
  192.     @echo "******       copying a file onto itself."
  193.  
  194. clean :
  195.     rm -f *.o *.log
  196.